Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

312
Vistas
Problem with "Personal_Sign" in ethereum.request - "Invalid parameters: must provide an Ethereum address."

I am getting a problem when I run this statement in the console window (from browser) to get signature of the account:

ethereum.request({ method: "personal_sign", params: [account, hash] });

I did not used to have this problem, it works fine and returns a promise with the digital signature of the account (from Metamask). It would open up Metamask, I would do a digital signing and return the result of the digital signature to the promise.

Now it reports an error whenever I run the statement. The error message is:

code: -32602 message: "Invalid parameters: must provide an Ethereum address."

Has something changed? I could not find any other details from ethereum.org or Metamask. If anyone has some knowledge on this, what seems to be the problem?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

First element of params ("account") have to be one of the connected accounts.

You can access accounts with;

window.ethereum
  .request({ method: "eth_requestAccounts" })
  .then(accounts => {
    console.log(accounts);
  })
about 4 years ago · Juan Pablo Isaza Denunciar

0

This has to do with MetaMask and the Ethereum window object in the browser.

Originally I tested the contract on a testnet using an injected Web3 provider.

When I was trying to test locally I used one of the JVM generated accounts.

You should not use them. Instead use a MetaMask account (copy the address) and do the ff:

assign the address to a variable (do the same with the hash):

account = Metamask address, hash = bytes32 value of your hashed message

I can then issue the ethereum.request command that will run the "personal_sign" method with the parameters of account and hash.

The promise will return the digital signature of the account when signing a message.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda